Certified Proofs in Programs Involving Exceptions
نویسندگان
چکیده
Exception handling is provided by most modern programming languages. It allows to deal with anomalous or exceptional events which require special processing. In computer algebra, exception handling is an efficient way to implement the dynamic evaluation paradigm: for instance, in linear algebra, dynamic evaluation can be used for applying programs which have been written for matrices with coefficients in a field to matrices with coefficients in a ring. Thus, a proof system for computer algebra should include a treatement of exceptions, which must rely on a careful description of a semantics of exceptions. The categorical notion of monad can be used for formalizing the raising of exceptions: this has been proposed by Moggi and implemented in Haskell. In this paper, we provide a proof system for exceptions which involves both raising and handling, by extending Moggi’s approach. Moreover, the core part of this proof system is dual to a proof system for side effects in imperative languages, which relies on the categorical notion of comonad. Both proof systems are implemented in the Coq proof assistant.
منابع مشابه
Bidirectional Certified Programming
Certified programming is one of the desirable approaches to developing dependable software, where expected properties of programs are formally proved by proof assistants such as Coq. One way for certified programming with Coq is to define a function, give proofs for its properties in Coq, and then extract a program in OCaml. Another way for certified programming with Coq is to import the defini...
متن کاملProofs-as-Programs in Computable Analysis (extended abstract)
Since the work of Brouwer, Kolmogorov, Goedel, Kleene and many others we know that constructive proofs have computational meaning. In Computer Science this idea is known as the ”proofs-as-programs paradigm” or ”Curry-Howard correspondence”. We present examples from computable analysis showing that this paradigm not only works in principle, but can be used to automatically synthesise practically...
متن کاملA Metalogical Approach to Foundational Certified Code
Foundational certified code systems seek to prove untrusted programs to be safe relative to safety policies given in terms of actual machine architectures. Previous efforts have employed a structure wherein the proofs are expressed in the same logic used to express the safety policy. We propose an alternative structure wherein safety proofs are expressed in the Twelf metalogic, thereby eliminat...
متن کاملCSR - 2 - 2009 PreProceedings of the Ninth International Workshop on Automated Verification of Critical Systems
Since the work of Brouwer, Kolmogorov, Goedel, Kleene and many others we know that constructive proofs have computational meaning. In Computer Science this idea is known as the ”proofs-as-programs paradigm” or ”Curry-Howard correspondence”. We present examples from computable analysis that show that this paradigm not only works in principle, but can be used to automatically synthesise practical...
متن کاملProgrammation fonctionnelle certifiée : L'extraction de programmes dans l'assistant Coq. (Certified functional programming : Program extraction within Coq proof assistant)
This work concerns the generation of programs which are certified to be correct byconstruction. These programs are obtained by extracting relevant information from construc-tive proofs made with the Coq proof assistant.Such a translation, named “extraction”, of constructive proofs into functional programsis not new, and corresponds to an isomorphism known as Curry-Howard’s. ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014